package com.se2.antiqueexhibition.Service.impl;

import com.se2.antiqueexhibition.Mapper.ReservationMapper;
import com.se2.antiqueexhibition.Service.ReservationService;
import com.se2.antiqueexhibition.pojo.Activity;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ReservationServiceimpl implements ReservationService {

    @Resource
    private ReservationMapper reservationMapper;

    @Override
    public void addReservation(int userId, int activityId) {
        reservationMapper.addReservation(userId, activityId);
    }

    @Override
    public List<Activity> showReservation(int userId) {
        return reservationMapper.showReservation(userId);
    }

    @Override
    public void cancelReservation(int userId, int id) {
        reservationMapper.cancelReservation(userId, id);
    }

    @Override
    public List<Integer> getReservationIdsByUserId(int userId) {
        return reservationMapper.getReservationIdsByUserId(userId);
    }
}
